-
Notifications
You must be signed in to change notification settings - Fork 13.5k
fix(datetime): set working parts to last selected value #29610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hey... what is the current status? Need the fix:-) |
@sean-perkins sorry for the ping, is this PR ready to be merged? Is there anything I can do to help (e.g. testing or dev)? |
Is there a timeline for fixing the bug? Or do you have a good workaround? |
hey, any update on this one? this is regression IMO because it was working correctly for me in previous versions |
…datetime-set-working-parts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀🌕
Issue number: resolves #29094
What is the current behavior?
When assigning multiple selected dates that span different months, the date time will not set the correct working parts and instead fallback to the default date: May 28, 2021.
What is the new behavior?
When opening the datetime with multiple dates selected, the calendar will animate to the last value in the array of selected dates.
If the datetime is collapsed, body is not visible, is not a grid view or the user has made a selection of a new date, the calendar will not animate and instead will set the working parts to the current value selected (latest/last value).
Does this introduce a breaking change?
Other information
Internally we discussed setting the month view to the first value in the array. Upon further investigation I determined this is not the expected behavior. When a user interacts with multiple date selection, the most recent selection (their active view) is the last value in the array. Animating or updating the working parts to the first value in the array would result in the calendar month jumping after every selection. Using the last index of the array results in no odd jumps in the experience. If a developer wishes to configure this behavior, they can change the order of the values in the value assigned to the datetime (to cause a specific month/date to be the initial view).
Dev build:
8.5.8-dev.11748388365.11ad9dfe